home *** CD-ROM | disk | FTP | other *** search
- /*
- * SPDStrings.h
- * (C) SPDsoft, August 13, 1995
- *
- * Some String utils
- */
-
- #ifndef _SPD_STRINGS_
- #define _SPD_STRINGS_
-
- #ifndef __POWERC__
- # define PStrCpy(dest,src) BlockMove((src), (dest), *(src) + 1 )
- #else
-
- /*
- * From keith@taligent.com (Keith Rollin), Jim Reekes
- *
- * This way, C will create an inline loop that copies the
- * string 4 bytes at a time in 64 iterations.
- *
- * (works with MPW C and Symantec C, at least
- */
-
- /*
- * 68000 gives address error, so, use this only for PPC
- */
-
- typedef struct {
- Str255 string;
- } Str255Struct;
-
- # define PStrCpy(a,b) *(Str255Struct*) (a) = *(Str255Struct*) (b)
-
- #endif
-
-
- void PStrCat( Str255 sio, Str255 si );
- void CStrToStr255( Str255 pstr, char *s );
- void Str255ToCStr( char *s, Str255 pstr );
-
-
- OSType Str255ToOSType( Str255 pstr );
- #define OSTypeToStr255( pstr, osty ) BlockMove( (osty), (pstr) + 1, sizeof(OSType)); *pstr = sizeof(OSType)
-
- #endif